VERSION 5.00
Begin VB.Form frmBanRange 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "IP Range Ban"
   ClientHeight    =   3810
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   3855
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3810
   ScaleWidth      =   3855
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.TextBox txtReason 
      Height          =   1455
      Left            =   120
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   2
      Top             =   1800
      Width           =   3615
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   2640
      TabIndex        =   4
      Top             =   3360
      Width           =   1095
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "OK"
      Enabled         =   0   'False
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   3360
      Width           =   1095
   End
   Begin VB.TextBox txtIP 
      Alignment       =   2  'Center
      Height          =   285
      Index           =   1
      Left            =   120
      TabIndex        =   1
      Top             =   960
      Width           =   3615
   End
   Begin VB.TextBox txtIP 
      Alignment       =   2  'Center
      Height          =   285
      Index           =   0
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   3615
   End
   Begin VB.Label Labels 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "Enter the reason why you're banning the IP Range (optional)"
      Height          =   495
      Index           =   2
      Left            =   0
      TabIndex        =   7
      Top             =   1320
      Width           =   3855
   End
   Begin VB.Label Labels 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "Enter the End IP to ban."
      Height          =   255
      Index           =   1
      Left            =   120
      TabIndex        =   6
      Top             =   720
      Width           =   3615
   End
   Begin VB.Label Labels 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "Enter the Start IP to ban."
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   3615
   End
End
Attribute VB_Name = "frmBanRange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'-----------------------------------------------------------------
'             PT DC Hub @ Direct Connect P2P Network
'-----------------------------------------------------------------
'       Developer: Carlos.DF (fLaSh) - Portugal
'          E-mail: carlosferreiracarlos@hotmail.com
' Project started: 10 - September - 2006
'         License: GNU General Public License.
'-----------------------------------------------------------------
'       Thanks to developers and contributores of SDCH/DDCH
'         The Left Hand, ButterflySoul, HaArD and Selyb
'  TheNOP, RollTheDice, JDommi, GhOstFaCE, ArchaicLight and TUFF
'-----------------------------------------------------------------
Option Explicit

Private Sub cmdOk_Click()
1:    On Error GoTo Err
2:    txtIP(0).Text = Replace(txtIP(0).Text, " ", "")
3:    txtIP(1).Text = Replace(txtIP(1).Text, " ", "")

5:    If g_objMyIPTools.ValidRange(txtIP(0).Text, txtIP(1).Text) Then
6:        g_colIPBans.Add txtIP(0).Text, txtIP(1).Text, "", "Admin / GUI", txtReason.Text, True
7:        Unload Me
8:    Else
9:        MsgBoxCenter Me, g_colMessages.Item("msgInvalidRange"), vbInformation
10:   End If

12:   Exit Sub
13:
Err:
14:   HandleError Err.Number, Err.Description, Erl & "|" & "frmBanRange.cmdOk_Click()"
End Sub

Private Sub Form_Load()
1:    On Error GoTo Err
2:    cmdCancel.Caption = g_colMessages.Item("msgCancel")
3:    cmdOk.Caption = g_colMessages.Item("msgOK")
4:    SetFont Me
5:    Exit Sub
6:
Err:
7:    HandleError Err.Number, Err.Description, Erl & "|" & "frmBanRange.Form_Load()"
End Sub

Private Sub cmdCancel_Click()
1:    Unload Me
End Sub

Private Sub Form_Paint()
1:   If g_objSettings.blSkin Then _
         PaintTileFormBackground Me, LoadImage(g_objSettings.lngSkin)
End Sub

Private Sub Form_Unload(Cancel As Integer)
1:   Set frmBanRange = Nothing
End Sub

Private Sub Label_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
1:   If g_objSettings.MoveForm Then _
         Call frmMove(Me)
End Sub

Private Sub txtIP_Change(Index As Integer)
1:   If txtIP(0).Text = "" And txtIP(1).Text = "" Then _
          cmdOk.Enabled = False _
     Else cmdOk.Enabled = True
End Sub

Private Sub txtIP_KeyPress(Index As Integer, KeyAscii As Integer)
1:   If KeyAscii = 13 Then _
         Call cmdOk_Click
End Sub
